
/***************************************************************************************
****************************************************************************************
* FILE		: hotCompress.h
* Description	: 
*			  
* Copyright (c) 2020 by Simlife. All Rights Reserved.
* 
* History:
* Version		Name		Date				Description
   0.1		Alen			2020/05/07		Initial Version
   
****************************************************************************************
****************************************************************************************/

#ifndef _HOTCOMPRESS_H_
#define _HOTCOMPRESS_H_

#define heat1ControlPort _pc
#define heat1ControlPortAndPin _pc5
#define heat1ControlPin PIN_5
#define heat1ControlPinReverse PIN_5_REVERSE
#define heat1ControlTypeControl _pcc
#define heat1ControlPullUpControl _pcpu

#define HEAT1_ON() (heat1ControlPortAndPin = 1)
#define HEAT1_OFF() (heat1ControlPortAndPin = 0)

// #define heat2ControlPort _pb
// #define heat2ControlPortAndPin _pb6
// #define heat2ControlPin PIN_6
// #define heat2ControlPinReverse PIN_6_REVERSE
// #define heat2ControlTypeControl _pbc
// #define heat2ControlPullUpControl _pbpu

// #define HEAT2_ON() (heat2ControlPortAndPin = 1)
// #define HEAT2_OFF() (heat2ControlPortAndPin = 0)

// #define	ntcPort				_pb
// #define	ntcPortAndPin		_pb2
// #define	ntcPin				B0000_0100
// #define	ntcPinReverse		B1111_1011
// #define	ntcTypeControl		_pbc
// #define	ntcPullUpControl		_pbpu

// #define	ntcControlPort				_pb
// #define	ntcControlPortAndPin			_pb4
// #define	ntcControlPin				B0001_0000
// #define	ntcControlPinReverse		B1110_1111
// #define	ntcControlTypeControl		_pbc
// #define	ntcControlPullUpControl		_pbpu

// #define	NTC_CONTROL_ON_()			(ntcControlPortAndPin = 0)
// #define	NTC_CONTROL_OFF_()			(ntcControlPortAndPin = 1)

#define TEMP_38 2522
#define TEMP_39 2555
#define TEMP_40 2588
#define TEMP_41 2621
#define TEMP_42 2653
#define TEMP_43 2685
#define TEMP_44 2716
#define TEMP_45 2747
#define TEMP_46 2777
#define TEMP_47 2807
#define TEMP_48 2836
#define TEMP_49 2864
#define TEMP_50 2893
#define TEMP_60 3145
#define TEMP_70 3349
#define TEMP_75 3434
#define TEMP_80 3509
#define TEMP_90 3634

#define HEAT_MAX_ADCV TEMP_46
#define HEAT_NTC_SHORT 3932 // ��ѹ����4.8V
#define HEAT_NTC_OPEN 106   // ��ѹС��0.13V

extern void initHotCompressControlPin(void);
extern void closeHotCompressPin(void);
extern void hotCompressPWMProcess(void);
extern void hotCompressSet(void);
extern void hotCompressProcess(void);
#endif /*_HOTCOMPRESS_H_*/
